import Vue from 'vue'

const components = []
const contexts = require.context('../auditTypeView', true, /\.vue$/)

contexts.keys().forEach((component) => {
  const componentEntity = contexts(component).default
  components.push(componentEntity)
})

function install() {
  components.forEach((com) => {
    com.name && Vue.component(com.name, com)
  })
}

export default {
  install,
}
